﻿/*
Project Name : Menfram
Module Name  : DAO
Date  : 07/06/2013
responsible : Mateus Neto
Obs  : The license of this software is Mozilla Public License 1.1 
contact : mentrixmax@gmail.com
*/

using System;


namespace Menfram.Implementation.DAL
{
    //Common interface for creating abstract classes for DAO.

    public interface IAbstractSQL
    {
        /// <summary>
        /// Method used to make a query to the database.
        /// </summary>
        System.Data.Common.DbCommand Command { get; set; }
        /// <summary>
        /// Method used to make connection with database
        /// </summary>
        System.Data.Common.DbConnection Connection { get; }

        /// <summary>
        /// Method used to make a query to the database.
        /// </summary>
        System.Data.Common.DbCommand getCommand(string sql);

        /// <summary>
        /// Method used to make a list of the parameters.
        /// </summary>
        System.Collections.Hashtable listOfTheParam { get; set; }

        /// <summary>
        /// Method used to populate parameteres of the query.
        /// </summary>
        void setParameteres();

        /// <summary>
        /// Method used to get the DbTransaction.
        /// </summary>
        System.Data.Common.DbTransaction Transaction { get; set; }

        /// <summary>
        /// Method used to get the Instance 
        /// </summary>
        IAbstractSQL getInstance();

        /// <summary>
        /// Method used to close the connection with database.
        /// </summary>
        bool closeConnection();
    }
}
